<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
{% comment %} This is the basic template for our website {% endcomment  %}
<html>
	<head>
		<title>
		{% comment %} A replaceable block for putting different titles on different pages {% endcomment %}
			
			{% block title %}
				Research Assistant
			{% endblock %}
		
		</title>
 		<style type="text/css">
            @import "/static/style.css";
            @import "/static/jquery-ui-1.8.1.custom.css";
        </style>
        
        {% block script %}

       	
       	<script src="/static/jquery-1.4.2.min.js" type="text/javascript"></script>
       	<script type="text/javascript" src="/static/parent.js"></script>      	
      
  		<script type="text/javascript" src="/static/jquery-ui-1.8.1.custom.min.js"> </script>
  		<script type="text/javascript" src="/static/jquery.form.js"> </script>
  		<script src="/static/jquery.livequery.js" type="text/javascript"></script>
  		
  		<script src="/static/jquery.cycle.all.min.js" type="text/javascript"></script>
      	<script src="/static/rotatingBanner.js" type="text/javascript"></script>
      	<link rel="stylesheet" type="text/css" media="screen" href="/static/rotatingBanner.css" />
  		
  		
        <script language="JavaScript">

         google.load("jquery", "1.4.2");
        
			function calcHeight(){
				//find the height of the internal page
					var the_height=document.getElementById('the_iframe').contentWindow.
					document.body.scrollHeight;

				//change the height of the iframe
					document.getElementById('the_iframe').height=the_height;
			}
			
			
		//-->
		</script>	
       	
	
       
        {% endblock %}
	</head>
	<body>
	
	<div id="popup_rename" style="display: none;">
		<label id="renameText">Some text</label> <input type="text" id="newName" value=""/>
	</div>
	
	<div id="popup_share" style="display: none;">
		<label id="shareText">Some text</label> <input type="text" id="userName" value=""/>
	</div>
	
	<div id="popup_content" style="display: none;">
		<p id="popupText">Some text</p>
		<input type="button" id="butUpload" value="Yes"/>
		<input type="button" id="butNoUpload" value="No" onclick="Close_Popup();"/>
	</div>
	
	
	<hr />	
		<div id="wrapper">
			<div id="toolbar">
				
				{% if users.get_current_user %}  	

					<label id="toolbar_user"> {{users.get_current_user.nickname}}</label>| <a href="/About" target="frame"> About</a> | <a href="/Help" target="frame"> Help</a> | <a href="{{logout}}"> Sign out</a>
				
				{% else %}
				 	<a href="/About" target="frame"> About</a> | <a href="/Help" target="frame"> Help</a> | <a href="{{login}}">Sign in</a>
					
				{% endif %}			
			</div>	
			
			<div id="logo">
				<a href="/"><img src="/static/images/ResearchAssistant2.jpg"/></a> 
			</div>	
	<hr />
		<!-- end #logo -->
		<div id="header">
			
			{% block search_form %}							
				<div id="search">

					<form method="post" target="frame" action="/Search" >
						<fieldset>
							<input type="text" name="SearchTerm" id="search-text" size="15"/>
							<input type="submit" id="search-submit" value="Search" /> <br/>
							<a href="/AdvancedSearch" target="frame" id="advanced_search" >Advanced Search</a>
						</fieldset>
					</form>
				</div>
			{% endblock %}
			<!-- end #search -->
			
			
			<div id="menu">
				<ul>
				<li><a href="/ShowHot" target="frame" id="mySugestions">Suggestions({{ num_suggestions }})</a></li>
				{% if users.get_current_user %} 
					<li><a href="/MyFollows" target="frame" id="myFollows">My Follows({{ num_follows }})</a></li>
					<li><a href="/ShowPendings" class="first" target="frame" id="myPendings"> Label Invitations({{ num_pendings }})</a></li>
				{% else %}
					<li><a href="/MyFollows" target="frame" id="myFollows">My Follows</a></li>
					<li><a href="/ShowPendings" class="first" target="frame" id="myPendings"> Label Invitations</a></li>
				{% endif %}
	
				</ul>
			</div>
			<!-- end #menu -->
		
		</div>

		
		<!-- end #header -->
		<!-- end #header-wrapper -->
		
		{% comment %} rotating banner start {% endcomment %}
		
	
		<div class="slideshow1Wrapper">
		<center>
        <div class="slideshow1">
            <a href="/Help#banner1" target="frame"><img src="/static/images/banner1_height_170px_width_1000px.jpg" width="1000" height="170" /></a>
           	<a href="/Help#banner2" target="frame"><img src="/static/images/banner2_height_170px_width_1000px.jpg" width="1000" height="170" /></a>
            <a href="/Help#banner3" target="frame"><img src="/static/images/banner3_height_170px_width_1000px.jpg" width="1000" height="170" /></a>
            <a href="/Help#banner4" target="frame"><img src="/static/images/banner4_height_170px_width_1000px.jpg" width="1000" height="170" /></a>
            <a href="/Help#banner5" target="frame"><img src="/static/images/banner5_height_170px_width_1000px.jpg" width="1000" height="170" /></a>
        </div>
        </center>
        </div>
        
        

		<center>
		<button id="closeBannerButton" class="fg-button-x closeBannerButton ui-button ui-button-label-x ui-widget ui-state-default ui-corner-all" input type="submit" OnClick="javascript:hideBanner();">Hide Intro X</button>
		<button id="showBannerButton" class="fg-button-x showBannerButton ui-button ui-button-label-x ui-widget ui-state-default ui-corner-all" input type="submit" style ="display: none;" OnClick="javascript:showBanner();">Show Intro +</button>
		</center>
		

		
		
		
		<div id="page">
		<div id="page-bgtop">
				
			
		
			<div id="content">
				{% block contents %}
				<iframe width="90%" id="the_iframe" name="frame"
						onLoad="calcHeight();"
						src="{{currPage}}"
						scrolling="NO"
						frameborder="0"
						height="1">
					An iframe capable browser is required to view this web site.
				</iframe>
				
					
					
				{% endblock %}
			</div>		
			<!-- end #content -->
		
		
		<!-- sidebar -->
		<div id="sidebar">
		
		{% if users.get_current_user %}	
				
			<div id="labelList">

				<div class="label" id ="firstLabel" style="display:none" >
		
					<div class="labelButtons" >
						<input type="button" class="labelButton" title="Click to display labeled articles" id="labelButton" value=""/>
						<button class="menuButton" id="menuButton">Display options</button>
					</div>	
				
					<div id="dropDown" class="dropDown" style="display:none" value="0"/>    				  
    				  	<a class="menuItem" id="Share" >Share</a>
      					 	
      					<a class="menuItem" id="Rename" >Rename</a>
      					
      					<a class="menuItem" id="Delete" >Delete</a>   
      					
      					<a class="menuItem" id="SendMail" >Send by Mail</a>
					
					</div>
				</div>
				
			</div>
			<br><br><br><br><br><br>
			
			<div id="labelList_shared">

				<div class="label label_shared" id ="firstLabel_shared" style="display:none" >
		
					<div class="labelButtons_shared" >
						<input type="button" class="labelButton_shared" title="Click to display labeled articles" id="labelButton_shared" value=""/>
						<button id="menuButton_shared">Display options</button>
					</div>	
				
					<div id="dropDown_shared" class="dropDown_shared" style="display:none" value="0">      				  
    				  	<a class="menuItem_shared" id="Share" >Share</a>
      					 	
      					<a class="menuItem_shared" id="UserList" >Users list</a>
      					
      					<a class="menuItem_shared" id="RemoveMe" >Leave group</a>
      					
      					<a class="menuItem_shared" id="Duplicate" >Duplicate to private</a>   
      					
      					<a class="menuItem_shared" id="SendMail" >Send by Mail</a>
					
					</div>
				</div>
				
			</div>
			
			
			<form id="labelName" action="/ShowArticlesByLabel">
				<input type="hidden" id="label_name" name="label_name" value =""/>
				<input type="hidden" id="new_name" name="new_name" value =""/>
			</form>	
				


	{% else %}
		
			<div id="labels_message" name="labels_message">
			<br>
				<img src="/static/images/ready.bmp">
			</div>	
		
	{% endif %}	
			
		</div>

		
		<div style="clear: both;">&nbsp;</div>
			
		</div>
		
		<!-- end #bgtop -->
		</div>
		<!-- end #page -->
		
		<div id="footer">

			<p> Research Assistant &copy; 2010</p>
			
		</div>
		<!-- end #footer -->

	
</body>
</html>



		
		
